TARGET=./lib/libtcmalloc.a
CXX=g++
CFLAGS=-g -o2 -Wall -fPIC -Wno-deprecated

SRC=./src
INC=-I./include

OBJS=$(addsuffix .o, $(basename $(wildcard $(SRC)/*.cpp)))

$(TARGET):$(OBJS)
	mkdir -p lib
	ar cqs $@ $^

%.o:%.cpp
	$(CXX) $(CFLAGS) -c -o $@ $< $(INC)

.PHONY:clean
	
clean:
	rm -rf src/*.o $(TARGET)
